package com.hospital.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.net.URI;
import java.util.Enumeration;
import java.util.Map;

/**
 * @author xhl
 */
@Slf4j
public class CustomHttpDelete extends HttpEntityEnclosingRequestBase {

    public final static String METHOD_NAME = "POST";

    public CustomHttpDelete() {
        super();
    }

    public CustomHttpDelete(final URI uri) {
        super();
        setURI(uri);
    }

    /**
     * @throws IllegalArgumentException if the uri is invalid.
     */
    public CustomHttpDelete(final String uri) {
        super();
        setURI(URI.create(uri));
    }

    @Override
    public String getMethod() {
        return METHOD_NAME;
    }

}